Learning Objectives

After completing this lesson, you'll be able to:

Instructions

In this lesson, you will:

Resources

Exercise

Sven

Sven is regularly asked to convert the community map into whatever format a colleague needs. He wants to hand that job back to them: one workspace that reads the community map, lets whoever runs it pick the output format, and returns the result as a single zipped folder.

In this exercise, you will:

1) Create the Workspace and Add the Reader

This workspace is built from scratch rather than opened from a starting file. Reading the geodatabase as a single merged feature type keeps the canvas compact, and it lets whoever runs the workspace choose which tables to read.

Adding a geodatabase reader

2) Add the Generic Writer

The Generic writer does not commit to a format when you add it. You still give it a starting format so the writer has something to work with, and the end user replaces that choice at runtime.

Adding a Generic writer

Attributes update when using Automatic mode

3) Review the User Parameters

Adding the reader and the writer created several user parameters automatically. Two are worth keeping, one is unnecessary, and one offers the end user far more choice than they need.

Automatically-created User Parameters

Setting the Output Format parameter

4) Add a Choice User Parameter

A Choice parameter offers a short list of formats instead of the full catalogue. The value FME stores is the format shortname the Generic writer needs, while the display text is what the end user reads.

Manage User Parameters

Adding a Choice parameter

Import Writer Formats

Choice Configuration table

The new parameter exists, but nothing uses it yet. Linking it to the writer's own Output Format parameter is what actually puts the end user in control of the format.

Linking Generic Writer to the new OutputFormat user parameter with restricted choices

Using the restricted options for Output Format

6) Set a Fanout on fme_feature_type

Everything currently writes to a single output feature type. Fanning out on fme_feature_type sends each feature back to a table named after the one it came from, which is what makes the output look like the source.

Setting feature type name using fme_feature_type

Changing geometry handling to avoid a bug in 25.1

7) Save and Run the Workspace

Running with prompting turned on is what exercises everything you just built: the table picker, the restricted format list and the fanout.

Setting the Destination parameter to write a zipped file

Selected tables have been written to Shapefile format

You have built a workspace that reads a geodatabase, lets whoever runs it choose from a short list of output formats, returns each table to its own layer, and delivers the result as a single zipped file. Publishing it to FME Flow would give users those same choices through a browser.

 

Tips

 

Additional Resources